<!DOCTYPE html>
<html>
 <head> 
  <meta charset="utf-8" /> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> 
  <title>{$data.name}</title> 
  <link rel="stylesheet" href="__STATIC__assets/libs/layui/css/layui.css" /> 
  <link rel="stylesheet" href="__STATIC__assets/module/admin.css?v=318" /> 
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]--> 
    <style>
        /** 应用列表样式 */
        .application-list-item {
            background-color: #fff;
            border: 1px solid #e8e8e8;
            border-radius: 4px;
            cursor: pointer;
            transition: all .2s;
        }

        .application-list-item:hover {
            box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
        }

        .application-list-item .application-list-item-header {
            padding: 16px 12px 0 12px;
        }

        .application-list-item .application-list-item-header .head {
            width: 25px;
            height: 25px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .application-list-item .application-list-item-header > h2 {
            color: #333;
            font-size: 18px;
            display: inline-block;
        }

        .application-list-item .application-list-item-body {
            padding: 12px 12px 12px 50px;
            font-size: 0;
        }

        .application-list-item .application-list-item-body .text-num-item {
            display: inline-block;
            width: 50%;
            font-size: 26px;
            color: #666;
        }

        .application-list-item .application-list-item-body .text-num-item .text-num-item-title {
            font-size: 12px;
            color: #999;
            margin-bottom: 10px;
        }

        .application-list-item .application-list-item-body .text-num-item small {
            font-size: 16px;
        }

        .application-list-item .application-list-item-tool {
            font-size: 0;
            background-color: #FAFAFA;
            border-top: 1px solid #e8e8e8;
            padding: 10px 0 5px 0;
            border-bottom-left-radius: 4px;
            border-bottom-right-radius: 4px;
        }

        .application-list-item .application-list-item-tool .application-list-item-tool-item {
            display: inline-block;
            width: 25%;
            font-size: 18px;
            text-align: center;
            color: #999;
            border-right: 1px solid #e8e8e8;
            box-sizing: border-box;
            cursor: pointer;
        }

        .application-list-item .application-list-item-tool .application-list-item-tool-item:last-child {
            border-right: none;
        }
        /** // 应用列表样式结束 */
    </style>
 </head> 
 <body> 
  <!-- 正文开始 --> 
  <div class="layui-fluid ew-console-wrapper"> 
   <div class="layui-row layui-col-space15"> 
    <div class="layui-col-xs12 layui-col-md4"> 
     <!-- 填充内容 --> 
     <div class="layui-card layui-form-pane"> 
      <div class="layui-card-header">
       接口信息
      </div> 
      <div class="layui-card-body"> 
       <div class="layui-form-item"> 
        <label class="layui-form-label">商户PID</label> 
        <div class="layui-input-block"> 
         <input type="text" name="pid" value="{$data.id}" autocomplete="off" placeholder="商户PID" class="layui-input text-center" readonly="" onclick="fuzhi(this)" /> 
        </div> 
       </div> 
       <div class="layui-form-item"> 
        <label class="layui-form-label">商户KEY</label> 
        <div class="layui-input-block"> 
         <input type="text" name="key" id="key_id" value="***已隐藏***" autocomplete="off" placeholder="商户KEY" class="layui-input text-center" readonly="" onclick="fuzhi(this)" /> 
        </div> 
       </div> 
       <input type="button" class="layui-btn layui-btn-xs" value="显示商户KEY" id="displaykey" style="border: none;outline:none;" /> 
       <input type="button" id="GeneratingKey" value="重新生成商户KEY" class="layui-btn layui-btn-danger layui-btn-xs" style="border: none;outline:none;" /> 
      </div> 
     </div>
     <div class="layui-card layui-form-pane"> 
      <div class="layui-card-header">
       支付网关
      </div> 
      <div class="layui-card-body"> 
       <div class="layui-form-item"> 
        <label class="layui-form-label">网址</label> 
        <div class="layui-input-block"> 
         <input type="text" style="margin-top:5px" value="{$data.url}" autocomplete="off" placeholder="网关网址" class="layui-input text-center" readonly="" onclick="fuzhi(this)" /> 
        </div> 
       </div> 
       </div> 
     </div> 
     <div class="layui-card"> 
      <div class="layui-card-header">
       接口模式
      </div> 
      <div class="layui-card-body">
       对接模式：<span id="duijei">{$data.jdfds}</span><br>对接状态：<input type="button" class="layui-btn layui-btn-xs" value="切换" id="sanshuann" style="border: none;outline:none;" />
      </div> 
     </div> 
     <div class="layui-card"> 
      <div class="layui-card-header">
       接口文档
      </div> 
      <div class="layui-card-body"> 
       <div class="alert alert-info alert-dismissible" role="alert">
           
        <div class="application-list-item">
            <div class="application-list-item-header">
                <img class="head" src="__STATIC__assets/images/lcxkvf.jpg"/>
                <h2>PHP语言</h2>
            </div>
            <div class="application-list-item-body">
                <div class="text-num-item">
                    <div class="text-num-item-title">默认</div>
                    <div class="text-num-item-text">
                    <a style="color:red;" href="__STATIC__assets/默认-DEMO文档-PHP.zip">    
                        <img class="ew-head-list" lay-tips="下载默认文档压缩包" lay-offset="0,-8px" width="25" src="__STATIC__assets/images/fdsasdsa.jpg"/>
                    </a>    
                    </div>
                </div>
                <div class="text-num-item">
                    <div class="text-num-item-title">易支付</div>
                    <div class="text-num-item-text">
                    <a style="color:red;" href="__STATIC__assets/易支付-DEMO文档-PHP.zip">    
                        <img class="ew-head-list" lay-tips="下载易支付文档压缩包" lay-offset="0,-8px" width="25" src="__STATIC__assets/images/fdsasdsa.jpg"/>
                    </a>    
                    </div>
                </div>
                <!--
                <div class="text-num-item">
                    <div class="text-num-item-title">码支付</div>
                    <div class="text-num-item-text">
                    <a style="color:red;" href="__STATIC__assets/码支付-DEMO文档-PHP.zip">      
                        <img class="ew-head-list" lay-tips="下载码支付文档压缩包" lay-offset="0,-8px" width="25" src="__STATIC__assets/images/fdsasdsa.jpg"/>
                    </a>    
                    </div>
                </div>-->
            </div>
        </div>
        
        </div> 
      </div> 
     </div> 
    </div> 
    <div class="layui-col-xs12 layui-col-md8"> 
     <!-- 填充内容 --> 
     <div class="layui-card"> 
      <div class="layui-card-header">
       接口文档
      </div> 
      <div class="layui-card-body"> 
      {$data.text|raw}
    </div>   
   </div> 
  </div> 
  <!-- js部分 --> 
  <script type="text/javascript" src="__STATIC__assets/js/jquery@1.11.3.js"></script>
  <script type="text/javascript" src="__STATIC__assets/libs/layui/layui.js"></script> 
  <script type="text/javascript" src="__STATIC__assets/js/common.js?v=318"></script> 
  <script>
  
        $('#sanshuann').click(function () {
        	layer.msg('加载中',{icon: 16,shade: 0.01});
			$.get('duijei', function(result){
                if(result.code == '1'){
        	       $('#duijei').html(result.data);
                   layer.msg(result.msg, {icon: 1}, function(){
                       //关闭后的操作
                       window.location.reload();
                       });
                }else{
                   layer.msg(result.msg, {icon: 2});
                }
			});
        	
        });
        
        $('#displaykey').click(function () {
        	$('#key_id').val("{$data.key}");
        	$('#displaykey').remove();
        });
        
        $('#GeneratingKey').click(function () {
        	 layer.confirm('你真的要重新生成KEY吗？这样会造成已对接过的网站发起支付和异步通知失败！', {
		            btn: ['确认','取消'] //按钮
        	        }, function(){
        	            layer.msg('加载中',{icon: 16,shade: 0.01});
			            $.get('generatingkey', function(result){
      		            if(result.code == '1'){
       		    	       layer.closeAll('loading');
       		    	       layer.msg(result.msg, {icon: 1});
       		    	       $('#displaykey').remove();
       		    	       $('#key_id').val(result.data);
              		    }else{
					    //请求失败
               			layer.closeAll('loading');
                    	layer.msg(result.msg, {icon: 2});
              		    }
              		 
			        });
			        
        	  });
        });
    
    function fuzhi(s) {
            s.select(); // 选择对象
            document.execCommand("Copy"); // 执行浏览器复制命令
            layer.msg("复制成功！");
    }
    
   
</script>  
 </body>
</html>